package com.dyna.digit.flowable.domain;

import com.dyna.constants.DateFatter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

/**
 *  项目工单
 * @author zhoucaiwang
 */
@Data
public class ProjSheet {

    @ApiModelProperty(value = "任务id")
    private String taskId;

    @ApiModelProperty(value = "项目id")
    @NotNull(message = "项目id不能为空")
    private Integer projectId;

    @ApiModelProperty(value = "处理人")
    private String assignee;

    @ApiModelProperty(value = "流程状态")
    private Integer flowStatus;

    @ApiModelProperty(value = "任务状态")
    @NotNull(message = "任务状态不能为空")
    @Pattern(regexp = "[0|1|2]", message = "任务状态值错误")
    private Integer status;

    @ApiModelProperty(value = "流程实例id")
    private String processInstanceId;

    @ApiModelProperty(value ="创建时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime createTime;

    @ApiModelProperty(value ="结束时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime endTime;

}
